7660f64aea9198d98fd88ee666b6cb52e2c0a574,flex/tools/flex-ui-designer/idea-plugin/src/com/intellij/flex/uiDesigner/libraries/LibraryManager.java,LibraryManager,sortLibraries,#LibrarySorter#number#List#String#Condition#,250
Before Change
}
@NotNull
private SortResult sortLibraries(LibrarySorter librarySorter, int librarySetId, List<Library> libraries, String flexSdkVersion,
Condition<String> isExternal)
throws InitException {
try {
return librarySorter.sort(libraries, new File(appDir, librarySetId + SWF_EXTENSION), isExternal);
}
catch (ClosedByInterruptException e) {
throw new InitException(e);
After Change
try {
final int id = persistentCache.enumerate(key);
SortResult result = persistentCache.get(key);
if (result == null) {
result = sorter.sort(libraries, new File(appDir, NAME_PREFIX + Integer.toString(id) + SWF_EXTENSION), isExternal, isSdk);
persistentCache.put(key, result);
}
else {
final String[] libraryPathes = result.libraryPathes;
final List<Library> filteredLibraries = new ArrayList<Library>(libraryPathes.length);
for (Library library : libraries) {
if (ArrayUtil.indexOf(libraryPathes, library.getFile().getPath()) != -1) {
filteredLibraries.add(library);